home *** CD-ROM | disk | FTP | other *** search
- /*
-
- File: handler_protos.h
- Author: Neil Cafferkey
- Copyright (C) 2001-2002 Neil Cafferkey
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- */
-
- #ifndef HANDLER_PROTOS_H
- #define HANDLER_PROTOS_H
-
-
- #include "handler.h"
-
-
- /* Function prototypes */
-
- struct Handler *CmdStartup(STRPTR name,struct DeviceNode *dev_node,
- struct MsgPort *proc_port);
- BOOL CmdDie(struct Handler *handler);
- BOOL CmdIsFileSystem();
- BOOL CmdFind(struct Handler *handler,struct FileHandle *handle,
- struct Lock *lock,const TEXT *name,ULONG mode);
- BOOL CmdFHFromLock(struct FileHandle *handle,struct Lock *lock);
- BOOL CmdEnd(struct Handler *handler,struct Opening *opening);
- UPINT CmdRead(struct Opening *opening,UBYTE *buffer,UPINT length);
- UPINT CmdWrite(struct Handler *handler,struct Opening *opening,
- UBYTE *buffer,UPINT length);
- UPINT CmdSeek(struct Opening *opening,PINT offset,LONG mode);
- PINT CmdSetFileSize(struct Handler *handler,struct Opening *opening,
- PINT offset,LONG mode);
- struct Lock *CmdLocateObject(struct Handler *handler,
- struct Lock *lock,const TEXT *name,ULONG mode);
- BOOL CmdFreeLock(struct Handler *handler,struct Lock *lock);
- struct Lock *CmdCopyDir(struct Handler *handler,struct Lock *lock);
- struct Lock *CmdCopyDirFH(struct Handler *handler,
- struct Opening *opening);
- struct Lock *CmdParent(struct Handler *handler,struct Lock *lock);
- struct Lock *CmdParentFH(struct Handler *handler,
- struct Opening *opening);
- BOOL CmdSameLock(struct Lock *lock1,struct Lock *lock2);
- struct Lock *CmdCreateDir(struct Handler *handler,
- struct Lock *lock,const TEXT *name);
- BOOL CmdExamineObject(struct Handler *handler,struct Lock *lock,
- struct FileInfoBlock *info);
- BOOL CmdExamineFH(struct Handler *handler,struct Opening *opening,
- struct FileInfoBlock *info);
- BOOL CmdExamineNext(struct Handler *handler,struct FileInfoBlock *info);
- BOOL CmdInfo(struct Handler *handler,struct InfoData *info_data);
- BOOL CmdSetProtect(struct Handler *handler,struct Lock *lock,
- const TEXT *name,ULONG flags);
- BOOL CmdSetComment(struct Handler *handler,struct Lock *lock,
- const TEXT *name,const TEXT *comment);
- BOOL CmdRenameObject(struct Handler *handler,struct Lock *old_lock,
- STRPTR old_name,struct Lock *new_lock,STRPTR new_name);
- BOOL CmdRenameDisk(struct Handler *handler,STRPTR new_name);
- BOOL CmdSetDate(struct Handler *handler,struct Lock *lock,STRPTR name,
- struct DateStamp *date);
- BOOL CmdDeleteObject(struct Handler *handler,struct Lock *lock,
- STRPTR name);
- struct DosList *CmdCurrentVolume(struct Handler *handler);
- BOOL CmdChangeMode(ULONG type,APTR thing,ULONG new_mode);
- BOOL CmdMakeLink(struct Handler *handler,struct Lock *lock,STRPTR name,
- APTR reference,LONG link_type);
- BOOL CmdWriteProtect(struct Handler *handler,BOOL on,ULONG key);
- BOOL CmdFlush();
- BOOL CmdAddNotify(struct Handler *handler,struct NotifyRequest *request);
- BOOL CmdRemoveNotify(struct Handler *handler,struct NotifyRequest *request);
-
- struct Object *CreateObject(struct Handler *handler,const TEXT *name,
- BYTE type,struct Object *parent);
- BOOL HDeleteObject(struct Handler *handler,struct Object *object);
- BOOL DeleteObject(struct Handler *handler,struct Object *object);
- struct Object *GetObject(struct Handler *handler,
- struct Lock *lock,const TEXT *name,struct Object **parent);
- PINT ChangeFileSize(struct Handler *handler,struct Opening *opening,
- PINT offset,LONG mode);
- UPINT ReadData(struct Opening *opening,UBYTE *buffer,UPINT length);
- UPINT WriteData(struct Handler *handler,struct Opening *opening,
- UBYTE *buffer,UPINT length);
- struct Lock *LockObject(struct Handler *handler,
- struct Object *object,LONG access);
- BOOL ExamineObject(struct Handler *handler,struct Object *object,
- struct FileInfoBlock *info);
- BOOL SetName(struct Handler *handler,struct Object *object,
- const TEXT *name);
- struct Lock *FixLock(struct Handler *handler,struct Lock *lock);
- struct Block *AddDataBlock(struct Handler *handler,struct Object *file,
- UPINT length);
- VOID FreeDataBlock(struct Object *file,struct Block *block);
- UPINT GetBlockLength(struct Object *file,struct Block *block);
- struct Object *GetRealObject(struct Object *object);
-
- VOID MatchNotifyRequests(struct Handler *handler);
- VOID NotifyAll(struct Handler *handler,struct Object *object,
- BOOL notify_links);
- VOID ReceiveNotifyReply(struct Handler *handler,
- struct NotifyMessage *message);
- struct Notification *FindNotification(struct Handler *handler,
- struct NotifyRequest *request);
- VOID Notify(struct Handler *handler,struct Notification *notification);
-
- UBYTE *MkBStr(STRPTR str);
-
- PINT SetString(TEXT **field,const TEXT *new_str);
- PINT SwapStrings(TEXT **field1,TEXT **field2);
- UPINT StrLen(const TEXT *s);
- UPINT StrSize(const TEXT *s);
- struct Node *FindNameNoCase(struct List *start,const TEXT *name);
- struct DosList *MyMakeDosEntry(const TEXT *name,LONG type);
- VOID MyFreeDosEntry(struct DosList *entry);
- BOOL MyRenameDosEntry(struct DosList *entry,const TEXT *name);
-
-
- #endif
-
-
-